﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DesignPatterns.AbstractFactoryPattern.Factories;

namespace DesignPatterns.AbstractFactoryPattern.Classes
{
    public class Driver
    {
        private SportsCar _sportsCar; 
        private FamilyCar _familyCar;

        public Driver(CarFactory carFactory) 
        { 
            _sportsCar = carFactory.CreateSportsCar(); 
            _familyCar = carFactory.CreateFamilyCar(); 
        }

        public void CompareSpeed() 
        { 
            _familyCar.Speed(_sportsCar); 
        }
    }
}
